//
//  DoorCollectionViewCell.m
//  RONGAO
//
//  Created by wei wang on 2017/2/23.
//  Copyright © 2017年 wei wang. All rights reserved.
//

#import "DoorCollectionViewCell.h"

@implementation DoorCollectionViewCell

-(void)setupView{
    
    self.backgroundColor = [UIColor whiteColor];
    [self masLayoutSubview];
}

- (void)masLayoutSubview{
    
    __weak UIView *superView = self;
    
    [self.TitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(superView.mas_centerX);
        make.centerY.mas_equalTo(superView.mas_centerY).mas_offset(-10);
    }];
    
    [self.describeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.centerX.mas_equalTo(superView.mas_centerX);
        make.centerY.mas_equalTo(superView.mas_centerY).mas_offset(20);
        
        
    }];

    [self.bottomLine mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.bottom.mas_equalTo(superView.mas_bottom);
        make.width.mas_equalTo(superView);
        make.height.mas_equalTo(0.5);
        
    }];
    [self.rightLine mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.right.mas_equalTo(superView.mas_right);
        make.width.mas_equalTo(0.5);
        make.height.mas_equalTo(superView);
    }];
}

- (UIView *)bottomLine{
    
    if (!_bottomLine) {
        
        _bottomLine = [[UIView alloc] init];
        _bottomLine.backgroundColor = [UIColor colorWithHexString:@"#e2e2e2"];
        [self addSubview:_bottomLine];
    }
    return _bottomLine;
}

- (UIView *)rightLine{
    
    if (!_rightLine) {
        
        _rightLine = [[UIView alloc] init];
        _rightLine.backgroundColor = [UIColor colorWithHexString:@"#e2e2e2"];
        [self addSubview:_rightLine];
    }
    return _rightLine;
}

- (UILabel *)TitleLabel{
    
    if (!_TitleLabel) {
        
        _TitleLabel = [[UILabel alloc] init];
        [_TitleLabel setFont:[UIFont systemFontOfSize:23.f]];
        _TitleLabel.textColor = [UIColor colorWithHexString:@"#56504f"];
        [self addSubview:_TitleLabel];
    }
    return _TitleLabel;
}

- (UILabel *)describeLabel{
    
    if (!_describeLabel) {
        
        _describeLabel = [[UILabel alloc] init];
        [_describeLabel setFont:[UIFont systemFontOfSize:12.f]];
        _describeLabel.textColor = [UIColor colorWithHexString:@"#56504f"];
        [self addSubview:_describeLabel];
    }
    return _describeLabel;
}

@end
